package com.example.swd1.gudong.constant;

import org.apache.http.client.CookieStore;
/**
 * author: Mr.5
 * Date: 17-1-4
 * Time: 下午2:38
 */

public class MyCookieStore {
    public static CookieStore cookieStore=null;

    public static String SESSIONID = null;
}

/*

    final HttpUtils httpRequest = new HttpUtils();
//第一次一般是还未被赋值，若有值则将 SessionId 发给服务器
    if(null != MyCookieStore.SESSIONID){
        httpPost.setHeader("Cookie", "JSESSIONID=" + MyCookieStore.SESSIONID);
        LogUtils.i("login","== setHeader === SESSIONID ====="+ MyCookieStore.SESSIONID);
    }
    httpRequest.configCookieStore(MyCookieStore.cookieStore);
*/

/*
* DefaultHttpClient dh = (DefaultHttpClient) httpRequest.getHttpClient();
MyCookieStore.cookieStore = dh.getCookieStore();
CookieStore cs = dh.getCookieStore();
List<Cookie> cookies = cs.getCookies();
for (int i = 0; i < cookies.size(); i++) {
    if ("JSESSIONID".equals(cookies.get(i).getName())) {
        MyCookieStore.SESSIONID = cookies.get(i).getValue();
        break;
    }
}
* */